﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StructureMap;
using StructureMap.Configuration.DSL;
using StructureMap.Configuration;
using Kona.Model;
using Kona.Infrastructure;
using Kona.SimpleSqlRepository;

public class Bootstrapper {
    public static void ConfigureStructureMap() {
        StructureMapConfiguration.AddRegistry(new SiteRegistry());
    }
}
public class SiteRegistry : Registry {
    protected override void configure() {

        ForRequestedType<IProductRepository>()
            .TheDefaultIsConcreteType<SimpleProductRepository>();

        ForRequestedType<ICustomerRepository>()
           .TheDefaultIsConcreteType<SimpleCustomerRepository>();

        ForRequestedType<IAuthenticationService>()
           .TheDefaultIsConcreteType<AspNetAuthenticationService>();

        ForRequestedType<IOrderRepository>()
           .TheDefaultIsConcreteType<SimpleOrderRepository>();

        ForRequestedType<IObjectStore>()
           .TheDefaultIsConcreteType<ObjectStore>();

        ForRequestedType<ICMSRepository>()
          .TheDefaultIsConcreteType<SimpleCMSRepository>();
    }

}
